﻿using System.Web.Mvc;
using Services.Implementations;

namespace Socaloud.Controllers {
    public class SoccerController : Controller {

        [HttpPost]
        public JsonResult GetLeaguesAndMatches() {
            var leagues = new XmlSoccerService().GetLeaguesWithMaches();
            return Json(leagues);
        }

        [HttpPost]
        public JsonResult GetMatch(string id) {
            var match = new XmlSoccerService().GetMatch(id);
            return Json(match);
        }

    }
}
